package com.example.flashsales.service.impl;

import com.example.flashsales.entity.vo.UserCostRecordVo;
import com.example.flashsales.mappers.UserCostRecordMapper;
import com.example.flashsales.service.UserCostRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class UserCostRecordServiceImpl implements UserCostRecordService {

    @Autowired
    UserCostRecordMapper userCostRecordMapper;

    /**
     * 增加一条纪录
     * @param orderId 订单id
     * @param money 金额
     * @param state 类型
     * @param adminId 审核人员id
     * @return
     */
    @Override
    public boolean addRecord(long userId,long orderId, double money, int state, long adminId) {
        return userCostRecordMapper.addRecord(userId,orderId, money, state, adminId) > 0;
    }




}
